/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data.model;

import java.util.Date;

/**
 *
 * @author zhenia
 */
public class Flight {

    private String id;
    private String code;
    private Date departureTime;
    private Date arrivalTime;
    private double cost;
    private double lenght;
    private Airline airline;
    private Airplane airplane;
    private Route route;

    public Flight(String id, String code, Date departureTime, Date arrivalTime, double cost, double lenght, Airline airline, Airplane airplane, Route route) {
        this.id = id;
        this.code = code;
        this.departureTime = departureTime;
        this.arrivalTime = arrivalTime;
        this.cost = cost;
        this.lenght = lenght;
        this.airline = airline;
        this.airplane = airplane;
        this.route = route;
    }

    public Flight() {
    }

    public Airline getAirline() {
        return airline;
    }

    public void setAirline(Airline airline) {
        this.airline = airline;
    }

    public Airplane getAirplane() {
        return airplane;
    }

    public void setAirplane(Airplane airplane) {
        this.airplane = airplane;
    }

    public Date getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(Date arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }

    public Date getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(Date departureTime) {
        this.departureTime = departureTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getLenght() {
        return lenght;
    }

    public void setLenght(double lenght) {
        this.lenght = lenght;
    }

    public Route getRoute() {
        return route;
    }

    public void setRoute(Route route) {
        this.route = route;
    }

    @Override
    public String toString() {
        return "Flight{" + "id=" + id + ", code=" + code + ", departureTime=" + departureTime + ", arrivalTime=" + arrivalTime + ", cost=" + cost + ", lenght=" + lenght + ", airline=" + airline + ", airplane=" + airplane + ", route=" + route + '}';
    }
}
